package com.heima.wemedia.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.wemedia.pojos.WmUser;
import org.apache.ibatis.annotations.Select;

public interface WmUserMapper extends BaseMapper<WmUser> {

    @Select("SELECT wm_user.* FROM wm_news JOIN wm_news ON wm_news.user_id = wm_user.id WHERE wm_news.article_id=#{articleId};")
    WmUser findByNewsId(Long articleId);
}
